function TioUtils(options){
    var self=this;
    this.options = {
        "url":"ws://xxxx",
        "debug":false,
        "timeoutInterval":5000,
        "onOpenEvent":function(ws){
            console.log("onOpenEvent")
        },
        "onMessageEvent":function(ws,resp){
            console.log("onMessageEvent")
        },
        "onSendMsgEvent":function(ws){
            console.log("onSendMsgEvent")
        }
    };
    this.options = Object.assign(this.options, options);//将设定参数和默认参数进行合并操作;
    var ws = new ReconnectingWebSocket(this.options.url);
    ws.debug = this.options.debug;
    ws.timeoutInterval = this.options.timeoutInterval;

    ws.onopen=function(){
        self.options.onOpenEvent(ws);
    };
    ws.onmessage=function(resp){
        self.options.onMessageEvent(ws,resp.data);
    };

    TioUtils.prototype.sendMsg=function(){
        self.options.onSendMsgEvent(ws);
    };

}